<template>
  <van-swipe
    class="my-swipe"
    :autoplay="3000"
    indicator-color="white"
    :loop="true"
  >
    <van-swipe-item v-for="item in slideList" :key="item.categoryId" class="img">
      <img :src= item.imgUrl>
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  name: "Slide",
  props: {
    slideList: {
      type: Array,
      default: function() {
        return [];
      },
      require: true,
    },
  },
  mounted() {
    // if(this.slideList.length>0){
    //   console.log(this.slideList);
    // }
  },
};
</script>

<style lang="scss" scoped>
  img{
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
</style>
